<template>
  <div class="container">
    <div class="bgwhite">
      <mu-list>
        <mu-list-item title>
          <span slot="left" class="ltxt">申请时间</span>
          <span slot="left" class="ltxt1">{{qData.createTime}}</span>
          <span slot="right" class="feeText">进行中</span>
        </mu-list-item>
        <mu-divider />
      </mu-list>
    </div>
    <div class="mt10"></div>
    <div class="bgwhite">
      <mu-list>
        <mu-list-item title=" 问诊人">
          <span slot="right">{{qData.personName||''}}</span>
        </mu-list-item>
        <mu-divider />
      </mu-list>
    </div>
    <div class="mt10"></div>
    <left-border-title :title="'病情描述'"></left-border-title>
    <div class="scon bgwhite">{{qData.question||''}}</div>
    <div class="mt10"></div>
    <left-border-title :title="'病情照片'"></left-border-title>
    <ul class="fileHandler flex wrap bgwhite">
      <li v-for="(item,index) in images" :key="index">
        <img :src="item.fileUrl" alt />
      </li>
    </ul>
    <div class="mt10"></div>
  </div>
</template>

<script>
import leftBorderTitle from "../../components/leftBorderTitle.vue";
export default {
  data() {
    return {
      qData: {},
      images: [],
      doctor: {},
      param: {
        consultId: ""
      }
    };
  },
  components: {
    leftBorderTitle
  },
  methods: {
    getOrderDetail() {
      if (!this.$route.query.cid) {
        this.$store.commit("UPDATE_TOAST", {
          message: "页面错误!"
        });
        return;
      }
      this.param.consultId = this.$route.query.cid;
      this.$api
        .doFormPostRequest(this.$api.RESTFUL_API.queryDetail, this.param)
        .then(res => {
          if (res && res.data) {
            res.data.cost = (res.data.cost || "") + "";
            this.qData = res.data;
            this.images = res.listAttr;
            this.doctor = res.doctor;
          } else {
            this.$store.commit("UPDATE_TOAST", {
              message: "服务器内部错误!"
            });
          }
        });
    }
  },
  mounted() {
    // this.getOrderDetail();
  }
};
</script>

<style lang="less" scoped>
@import "../../common/css/flex.css";
@import "../../common/css/component";
.container {
  padding-bottom: 30px;
  @{deep} .mu-item-left img {
    width: 30px;
    height: 30px;
  }
  @{deep} .mu-item.show-left {
    padding-left: 60px;
  }
  @{deep} .mu-item-title {
    color: #666;
    font-size: 14px;
  }
  @{deep} .mu-item-text {
    color: #ccc;
  }
  @{deep} .mu-item-right {
    color: #333;
    font-size: 14px;
  }
  @{deep} .mu-item {
    min-height: 44px;
  }
  .feeText {
    font-weight: normal;
    color: #0fc47d;
    font-size: 14px;
  }
  .ltxt {
    white-space: nowrap;
    color: #666;
    padding-right: 10px;
    font-size: 14px;
  }
  .ltxt1 {
    white-space: nowrap;
    color: #999;
    font-size: 14px;
  }
  .lefttime {
    width: 100%;
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 14px;
    color: #ff6600;
    background: #fffdce;
    border-bottom: 1px solid #e8e8e8;
  }
  .fcon {
    padding: 0px 15px 0px 15px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    > div:first-child {
      width: 100%;
      height: 40px;
      line-height: 40px;
      border-bottom: 1px solid #e8e8e8;
      font-size: 14px;
      color: #666;
    }
  }
  .scon {
    border-top: 1px solid #e8e8e8;
    width: 100%;
    padding: 15px;
    color: #666;
    font-size: 14px;
  }
  .tcon {
    border-top: 1px solid #e8e8e8;
    width: 100%;
    padding: 15px;
    color: #666;
    font-size: 14px;
  }
  .fileHandler {
    border-top: 1px solid #e8e8e8;
    padding: 0px 15px;
    padding-bottom: 20px;
    li {
      position: relative;
      width: 25%;
      height: 25%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 20px;
      img {
        width: 80%;
        height: 80%;
        border-radius: 4px;
      }
    }
  }
  .lcon {
    width: 100%;
    padding-top: 10px;
    text-align: center;
    @{deep}.mu-raised-button {
      width: 80%;
      height: 44px;
      margin-top: 20px;
    }
    @{deep}.mu-raised-button-secondary {
      color: #f24242;
      border: 1px solid #f24242;
      background: #fff1f1;
    }
  }
}
</style>
